{% extends 'desk/desk_base.html' %}

{% block title %}
    桌子管理首页
{% endblock %}
{% block content %}
    <ol class="breadcrumb">
      <li><a href="#">首页</a></li>
      <li><a href="#">桌子管理</a></li>
      <li class="active">桌子管理首页</li>
    </ol>

    <table class="table">
        <tr>
            <td>序号</td>
            <td>桌子名</td>
            <td>可容纳人数</td>
            <td>操作</td>
        </tr>
        {% for desk in Desks %}
            <tr>
                <td>{{ loop.index }}</td>
                <td>{{ desk.desk_name }}</td>
                <td>{{ desk.men }}</td>
                <td>
                    {% if desk.is_delete == 0 %}
                        <button class="btn btn-danger">下架</button>
                    {% elif desk.is_delete == 1 %}
                        <button class="btn btn-success">激活</button>
                    {% endif %}
                </td>
            </tr>
        {% endfor %}
    </table>

{% endblock %}